<!doctype html>
<html lang="en">
<head>
    <meta charset="UTF-8">
    <title>A Simple HTML Form</title>
</head>
<body>
<h1>A Simple HTML Form</h1>
<div>
    <h3>PHP - A Simple HTML Form - POST</h3>
    <div>
        <form action="PHPFormHandling.php" method="post">
            Name: <input type="text" name="name"><br>
            E-mail: <input type="text" name="email"><br>
            <input type="submit">
        </form>
    </div>
    <?php
    if(isset($_POST['name']) && isset($_POST['email'])){
        echo("Welcome: ". $_POST['name']);
        echo("<br/>");
        echo("Your email address is: ".$_POST["email"]);
    }

    ?>
</div>
<div>
    <h3>PHP - A Simple HTML Form - GET</h3>
    <div>
        <form action="PHPFormHandling.php" method="get">
            Name: <input type="text" name="name"><br>
            E-mail: <input type="text" name="email"><br>
            <input type="submit">
        </form>
    </div>
    <?php
    if(isset($_GET['name']) && isset($_GET['email'])){
        echo("Welcome: ". $_GET['name']);
        echo("<br/>");
        echo("Your email address is: ".$_GET["email"]);
    }
    ?>
</div>
</body>
</html>